package Services

import (
	"context"

	"github.com/go-kit/kit/endpoint"
)

type UserRequest struct {
	Uid int `json:uid`
}

type UserResPonse struct {
	Result string `json:result`
}

func GenUserEndpoint(userService IUserService) endpoint.Endpoint {
	return func(ctx context.Context, request interface{}) (response interface{}, err error) {
		r := request.(UserRequest)
		result := userService.GetName(r.Uid)
		return UserResPonse{Result: result}, nil
	}
}
